The Gestalt Selector and Response Bits
You can test whether Open Transport and its various parts are available by using theGestalt
function with the'otan'
selector. TheGestalt
function returns information by setting or clearing bits in theresponse
parameter. The bits currently used are defined by constants, shown along with the Open Transport selector in the following enumeration:
enum { gestaltOpenTpt = 'otan', gestaltOpenTptPresent = 0x00000001, gestaltOpenTptLoaded = 0x00000002, gestaltOpenTptAppleTalkPresent = 0x00000004, gestaltOpenTptAppleTalkLoaded = 0x00000008, gestaltOpenTptTCPPresent = 0x00000010, gestaltOpenTptTCPLoaded = 0x00000020, gestaltOpenTptIPXSPXPresent = 0x00000040, gestaltOpenTptIPXSPXLoaded = 0x00000080 };For more information about theGestalt
function, see Inside Macintosh: Operating System Utilities.